<%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="/WEB-INF/tlds/helpers.tld" prefix="helpers"%>

<c:if test="${empty posts}">
	<p>The blog has no entries.</p>
</c:if>
<c:if test="${not empty posts}">
	<c:forEach var="p" items="${posts}">
		<p class="post">
		<h2><a
			href="${request.contextPath}/blog/view/${p.id}/${p.urlString}"><c:out
			value="${p.title}" /> </a></h2>
		<div class="post-info"><b><c:out value="${p.author.name}" />
		<fmt:formatDate pattern="yyyy-MM-dd" value="${post.date}" /></b></div>
		<div><helpers:FormatWiki>
			<c:out value="${p.preview}" escapeXml="false" />
		</helpers:FormatWiki></div>
		<div>Tags: <c:out value="${p.tagString}" /></div>
		</p>
	</c:forEach>
</c:if>



